package com.richard.myapplication.nestedScroll2;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.richard.myapplication.R;

import java.util.ArrayList;
import java.util.List;

public class NestedScroll2Activity extends AppCompatActivity {
    private LinearLayout ll_content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_nested_scroll2);

        ll_content = findViewById(R.id.ll_content);
        for (int i = 0; i < 10; i++) {
            ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 300);
            TextView textView = new TextView(this);
            textView.setText("===哈哈哈哈===");
            textView.setLayoutParams(params);
            textView.setGravity(Gravity.CENTER);
            ll_content.addView(textView);
        }
    }
}
